Integrand size = 24, antiderivative size = 198 \[ \int \cos ^{12}(c+d x) (a+i a \tan (c+d x))^5 \, dx=\frac {7 a^5 x}{128}-\frac {i a^{11}}{24 d (a-i a \tan (c+d x))^6}-\frac {i a^{10}}{20 d (a-i a \tan (c+d x))^5}-\frac {3 i a^9}{64 d (a-i a \tan (c+d x))^4}-\frac {i a^8}{24 d (a-i a \tan (c+d x))^3}-\frac {5 i a^7}{128 d (a-i a \tan (c+d x))^2}-\frac {3 i a^6}{64 d (a-i a \tan (c+d x))}+\frac {i a^6}{128 d (a+i a \tan (c+d x))} \]
[Out]
Time = 0.15 (sec) , antiderivative size = 198, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3568, 46, 212} \[ \int \cos ^{12}(c+d x) (a+i a \tan (c+d x))^5 \, dx=-\frac {i a^{11}}{24 d (a-i a \tan (c+d x))^6}-\frac {i a^{10}}{20 d (a-i a \tan (c+d x))^5}-\frac {3 i a^9}{64 d (a-i a \tan (c+d x))^4}-\frac {i a^8}{24 d (a-i a \tan (c+d x))^3}-\frac {5 i a^7}{128 d (a-i a \tan (c+d x))^2}-\frac {3 i a^6}{64 d (a-i a \tan (c+d x))}+\frac {i a^6}{128 d (a+i a \tan (c+d x))}+\frac {7 a^5 x}{128} \]
[In]
[Out]
Rule 46
Rule 212
Rule 3568
Rubi steps \begin{align*} \text {integral}& = -\frac {\left (i a^{13}\right ) \text {Subst}\left (\int \frac {1}{(a-x)^7 (a+x)^2} \, dx,x,i a \tan (c+d x)\right )}{d} \\ & = -\frac {\left (i a^{13}\right ) \text {Subst}\left (\int \left (\frac {1}{4 a^2 (a-x)^7}+\frac {1}{4 a^3 (a-x)^6}+\frac {3}{16 a^4 (a-x)^5}+\frac {1}{8 a^5 (a-x)^4}+\frac {5}{64 a^6 (a-x)^3}+\frac {3}{64 a^7 (a-x)^2}+\frac {1}{128 a^7 (a+x)^2}+\frac {7}{128 a^7 \left (a^2-x^2\right )}\right ) \, dx,x,i a \tan (c+d x)\right )}{d} \\ & = -\frac {i a^{11}}{24 d (a-i a \tan (c+d x))^6}-\frac {i a^{10}}{20 d (a-i a \tan (c+d x))^5}-\frac {3 i a^9}{64 d (a-i a \tan (c+d x))^4}-\frac {i a^8}{24 d (a-i a \tan (c+d x))^3}-\frac {5 i a^7}{128 d (a-i a \tan (c+d x))^2}-\frac {3 i a^6}{64 d (a-i a \tan (c+d x))}+\frac {i a^6}{128 d (a+i a \tan (c+d x))}-\frac {\left (7 i a^6\right ) \text {Subst}\left (\int \frac {1}{a^2-x^2} \, dx,x,i a \tan (c+d x)\right )}{128 d} \\ & = \frac {7 a^5 x}{128}-\frac {i a^{11}}{24 d (a-i a \tan (c+d x))^6}-\frac {i a^{10}}{20 d (a-i a \tan (c+d x))^5}-\frac {3 i a^9}{64 d (a-i a \tan (c+d x))^4}-\frac {i a^8}{24 d (a-i a \tan (c+d x))^3}-\frac {5 i a^7}{128 d (a-i a \tan (c+d x))^2}-\frac {3 i a^6}{64 d (a-i a \tan (c+d x))}+\frac {i a^6}{128 d (a+i a \tan (c+d x))} \\ \end{align*}
Time = 0.64 (sec) , antiderivative size = 159, normalized size of antiderivative = 0.80 \[ \int \cos ^{12}(c+d x) (a+i a \tan (c+d x))^5 \, dx=-\frac {a^5 \sec ^7(c+d x) (-1750 \cos (c+d x)-1575 \cos (3 (c+d x))-693 \cos (5 (c+d x))+50 \cos (7 (c+d x))+350 i \sin (c+d x)+945 i \sin (3 (c+d x))-840 i \arctan (\tan (c+d x)) (\cos (5 (c+d x))-i \sin (5 (c+d x)))+525 i \sin (5 (c+d x))-70 i \sin (7 (c+d x)))}{15360 d (-i+\tan (c+d x)) (i+\tan (c+d x))^6} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 360 vs. \(2 (168 ) = 336\).
Time = 0.79 (sec) , antiderivative size = 361, normalized size of antiderivative = 1.82
\[\frac {i a^{5} \left (-\frac {\left (\cos ^{8}\left (d x +c \right )\right ) \left (\sin ^{4}\left (d x +c \right )\right )}{12}-\frac {\left (\cos ^{8}\left (d x +c \right )\right ) \left (\sin ^{2}\left (d x +c \right )\right )}{30}-\frac {\left (\cos ^{8}\left (d x +c \right )\right )}{120}\right )+5 a^{5} \left (-\frac {\left (\sin ^{3}\left (d x +c \right )\right ) \left (\cos ^{9}\left (d x +c \right )\right )}{12}-\frac {\sin \left (d x +c \right ) \left (\cos ^{9}\left (d x +c \right )\right )}{40}+\frac {\left (\cos ^{7}\left (d x +c \right )+\frac {7 \left (\cos ^{5}\left (d x +c \right )\right )}{6}+\frac {35 \left (\cos ^{3}\left (d x +c \right )\right )}{24}+\frac {35 \cos \left (d x +c \right )}{16}\right ) \sin \left (d x +c \right )}{320}+\frac {7 d x}{1024}+\frac {7 c}{1024}\right )-10 i a^{5} \left (-\frac {\left (\cos ^{10}\left (d x +c \right )\right ) \left (\sin ^{2}\left (d x +c \right )\right )}{12}-\frac {\left (\cos ^{10}\left (d x +c \right )\right )}{60}\right )-10 a^{5} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{11}\left (d x +c \right )\right )}{12}+\frac {\left (\cos ^{9}\left (d x +c \right )+\frac {9 \left (\cos ^{7}\left (d x +c \right )\right )}{8}+\frac {21 \left (\cos ^{5}\left (d x +c \right )\right )}{16}+\frac {105 \left (\cos ^{3}\left (d x +c \right )\right )}{64}+\frac {315 \cos \left (d x +c \right )}{128}\right ) \sin \left (d x +c \right )}{120}+\frac {21 d x}{1024}+\frac {21 c}{1024}\right )-\frac {5 i a^{5} \left (\cos ^{12}\left (d x +c \right )\right )}{12}+a^{5} \left (\frac {\left (\cos ^{11}\left (d x +c \right )+\frac {11 \left (\cos ^{9}\left (d x +c \right )\right )}{10}+\frac {99 \left (\cos ^{7}\left (d x +c \right )\right )}{80}+\frac {231 \left (\cos ^{5}\left (d x +c \right )\right )}{160}+\frac {231 \left (\cos ^{3}\left (d x +c \right )\right )}{128}+\frac {693 \cos \left (d x +c \right )}{256}\right ) \sin \left (d x +c \right )}{12}+\frac {231 d x}{1024}+\frac {231 c}{1024}\right )}{d}\]
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.61 \[ \int \cos ^{12}(c+d x) (a+i a \tan (c+d x))^5 \, dx=\frac {{\left (840 \, a^{5} d x e^{\left (2 i \, d x + 2 i \, c\right )} - 10 i \, a^{5} e^{\left (14 i \, d x + 14 i \, c\right )} - 84 i \, a^{5} e^{\left (12 i \, d x + 12 i \, c\right )} - 315 i \, a^{5} e^{\left (10 i \, d x + 10 i \, c\right )} - 700 i \, a^{5} e^{\left (8 i \, d x + 8 i \, c\right )} - 1050 i \, a^{5} e^{\left (6 i \, d x + 6 i \, c\right )} - 1260 i \, a^{5} e^{\left (4 i \, d x + 4 i \, c\right )} + 60 i \, a^{5}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{15360 \, d} \]
[In]
[Out]
Time = 0.49 (sec) , antiderivative size = 301, normalized size of antiderivative = 1.52 \[ \int \cos ^{12}(c+d x) (a+i a \tan (c+d x))^5 \, dx=\frac {7 a^{5} x}{128} + \begin {cases} \frac {\left (- 33776997205278720 i a^{5} d^{6} e^{14 i c} e^{12 i d x} - 283726776524341248 i a^{5} d^{6} e^{12 i c} e^{10 i d x} - 1063975411966279680 i a^{5} d^{6} e^{10 i c} e^{8 i d x} - 2364389804369510400 i a^{5} d^{6} e^{8 i c} e^{6 i d x} - 3546584706554265600 i a^{5} d^{6} e^{6 i c} e^{4 i d x} - 4255901647865118720 i a^{5} d^{6} e^{4 i c} e^{2 i d x} + 202661983231672320 i a^{5} d^{6} e^{- 2 i d x}\right ) e^{- 2 i c}}{51881467707308113920 d^{7}} & \text {for}\: d^{7} e^{2 i c} \neq 0 \\x \left (- \frac {7 a^{5}}{128} + \frac {\left (a^{5} e^{14 i c} + 7 a^{5} e^{12 i c} + 21 a^{5} e^{10 i c} + 35 a^{5} e^{8 i c} + 35 a^{5} e^{6 i c} + 21 a^{5} e^{4 i c} + 7 a^{5} e^{2 i c} + a^{5}\right ) e^{- 2 i c}}{128}\right ) & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.43 (sec) , antiderivative size = 187, normalized size of antiderivative = 0.94 \[ \int \cos ^{12}(c+d x) (a+i a \tan (c+d x))^5 \, dx=\frac {105 \, {\left (d x + c\right )} a^{5} + \frac {105 \, a^{5} \tan \left (d x + c\right )^{11} + 595 \, a^{5} \tan \left (d x + c\right )^{9} + 1386 \, a^{5} \tan \left (d x + c\right )^{7} + 1686 \, a^{5} \tan \left (d x + c\right )^{5} - 240 i \, a^{5} \tan \left (d x + c\right )^{4} + 45 \, a^{5} \tan \left (d x + c\right )^{3} + 1824 i \, a^{5} \tan \left (d x + c\right )^{2} + 1815 \, a^{5} \tan \left (d x + c\right ) - 496 i \, a^{5}}{\tan \left (d x + c\right )^{12} + 6 \, \tan \left (d x + c\right )^{10} + 15 \, \tan \left (d x + c\right )^{8} + 20 \, \tan \left (d x + c\right )^{6} + 15 \, \tan \left (d x + c\right )^{4} + 6 \, \tan \left (d x + c\right )^{2} + 1}}{1920 \, d} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 914 vs. \(2 (154) = 308\).
Time = 0.88 (sec) , antiderivative size = 914, normalized size of antiderivative = 4.62 \[ \int \cos ^{12}(c+d x) (a+i a \tan (c+d x))^5 \, dx=\text {Too large to display} \]
[In]
[Out]
Time = 5.56 (sec) , antiderivative size = 171, normalized size of antiderivative = 0.86 \[ \int \cos ^{12}(c+d x) (a+i a \tan (c+d x))^5 \, dx=\frac {7\,a^5\,x}{128}-\frac {-\frac {7\,a^5\,{\mathrm {tan}\left (c+d\,x\right )}^6}{128}-\frac {a^5\,{\mathrm {tan}\left (c+d\,x\right )}^5\,35{}\mathrm {i}}{128}+\frac {49\,a^5\,{\mathrm {tan}\left (c+d\,x\right )}^4}{96}+\frac {a^5\,{\mathrm {tan}\left (c+d\,x\right )}^3\,35{}\mathrm {i}}{96}+\frac {63\,a^5\,{\mathrm {tan}\left (c+d\,x\right )}^2}{640}+\frac {a^5\,\mathrm {tan}\left (c+d\,x\right )\,133{}\mathrm {i}}{384}-\frac {31\,a^5}{120}}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^7+{\mathrm {tan}\left (c+d\,x\right )}^6\,5{}\mathrm {i}-9\,{\mathrm {tan}\left (c+d\,x\right )}^5-{\mathrm {tan}\left (c+d\,x\right )}^4\,5{}\mathrm {i}-5\,{\mathrm {tan}\left (c+d\,x\right )}^3-{\mathrm {tan}\left (c+d\,x\right )}^2\,9{}\mathrm {i}+5\,\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )} \]
[In]
[Out]